knitr::opts_chunk$set(echo = TRUE)
library(bupaR) library(edeaR) library(processmonitR) library(plotluck) library(DiagrammeR) library(data.table) #library(DiagrammeRsvg) csvLog<-read.table("../Motivation.csv",header = TRUE, sep = ";",na = c("n.v.t.","onbekend","")) csvLog$status = "complete" csvLog$activity_instance = 1:nrow(csvLog) csvLog$timestamp<-as.POSIXct(strptime(csvLog$Timestamp, "%d-%m-%Y")) kolomNamen<-colnames(csvLog) csvLog$activity_instance = 1:nrow(csvLog) csvLog$status<-"start" csvLog$SentimentGem <- as.numeric(csvLog$SentimentGem)
colnames(csvLog)
if (!("Werknemer" %in% colnames(csvLog))){csvLog$Werknemer<-NA} eventLog.Base<-eventlog(csvLog, case_id = "CaseNr", activity_id = "Motivatie_totaal", activity_instance_id = "activity_instance", lifecycle_id = "status", timestamp = "timestamp", resource_id = "SentimentGem" )
graphStandaard <- process_map(eventLog.Base, type = performance(),render = FALSE ) graphStandaard %>% export_graph(file_name = "Z:/Dump/mapMetStandaardFunctie.svg", file_type = "SVG")
fileName <- "SentimentGem" agregationInst = list( enriched_frequency(value = "absolute", columnName = "aantal"),enriched_column_aggregate( FUN = mean, columnNameIn = "SentimentGem", columnNameOut = "SentimentGem", edgeOperation = "to") ) map<-enriched_process_map(eventLog.Base, aggregationInstructions = agregationInst ) map <- map %>% processmapR::color_activities( column = "SentimentGem", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "green1") %>% label_activities(columns =c("activity_name","SentimentGem")) %>% color_transitions(column = "SentimentGem", colorCaption = "black", colorUpperbound = "deeppink", colorLowerbound = "darkgreen") %>% label_transitions(columns = c("SentimentGem")) x<- get_node_df(map) map %>% export_graph(file_name = "Z:/Dump/SentimentGem.svg", file_type = "SVG")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.